home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5630 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: engr.sgi.com!shankar
  2. From: shankar@engr.sgi.com (Shankar Unni)
  3. Newsgroups: gnu.g++.help,comp.lang.c++,comp.sys.sgi.apps,comp.sys.sgi.misc
  4. Subject: Re: SGI and C++
  5. Followup-To: gnu.g++.help,comp.lang.c++,comp.sys.sgi.apps,comp.sys.sgi.misc
  6. Date: 6 Feb 1996 00:23:34 GMT
  7. Organization: Silicon Graphics, Inc., Mountain View, CA
  8. Message-ID: <4f6726$4ch@fido.asd.sgi.com>
  9. References: <4f609s$rho@fu-berlin.de>
  10. Reply-To: shankar@engr.sgi.com
  11. NNTP-Posting-Host: boris.mti.sgi.com
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14. Axel Thimm (axl@zedat.fu-berlin.de) wrote:
  15.  
  16. >  I tried CC and cc but e.g. neither recognizes 'bool' as an integrated
  17. > type. Are there any flags, I should have put into the compiler line? I
  18. > looked at the man pages but found nothing. The C++ progs have .cc
  19. > suffices.
  20.  
  21. C doesn't have a bool type anyway. The C++ bool type is relatively new, and
  22. the 6.1 compiler doesn't have it. The -64 and -n32 compilers on Irix 6.2
  23. will recognize bool.
  24.  
  25. In the meantime, there's a simple source workaround for bool, which will
  26. interoperate with the real bool when you get Irix 6.2 (after its release):
  27.  
  28.     #ifndef _BOOL
  29.     /* Builtin bool not available - use typedef */
  30.     typedef unsigned char bool;
  31.     static const bool false = 0;
  32.     static const bool true = 1;
  33.     #endif /* _BOOL */
  34.  
  35. --
  36. Shankar Unni                E-Mail:    shankar@sgi.com
  37. Silicon Graphics Inc.            Phone:    +1-415-933-2072
  38. URL:    http://reality.sgi.com/employees/shankar
  39.